# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=efm-langserver
pkgver=0.0.49
pkgrel=0
pkgdesc="General purpose language server"
url="https://github.com/mattn/efm-langserver"
arch="all"
license="MIT"
makedepends="go"
options="net chmod-clean"
source="$pkgname-$pkgver.tar.gz::https://github.com/mattn/efm-langserver/archive/refs/tags/v$pkgver.tar.gz"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build -ldflags="-X main.revision=$pkgver" -o $pkgname .
}

check() {
	go test ./...
}

package() {
	install -Dm755 $pkgname "$pkgdir"/usr/bin/$pkgname
}

sha512sums="
ee2a0b07593b6009eaf79a227d47ba266f19e49fa5e85b34ac2c82b8fa52155c6edc5d32f944945fd8e984508985920b69d5f16055d4e88a2ab16d6aa20eeb85  efm-langserver-0.0.49.tar.gz
"
